package com.xiezc.fetch.controller;

import com.xiezc.fetch.spider.biquge.BiqugeService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class DownloadController {


    @Resource
    BiqugeService biqugeService;


    @PostMapping(value = "/downLoadBookInfo")
    public String downLoadBookInfo(String[] urls) {
        biqugeService.downloadBookInfoStart(urls);
        return "ok";
    }


    @GetMapping(value = "/downLoadChapter")
    public String downLoadChapter() {
        biqugeService.downloadChapter();
        return "ok";
    }

}